package cz.possoft.explorer.meta;

import java.util.Map;

import cz.possoft.explorer.resolver.Resolver;
import cz.possoft.explorer.resolver.method.MethodKey;
import cz.possoft.explorer.resolver.method.MethodResolver;

/**
 * @author <a href="mailto:mposolda@gmail.com">Marek Posolda</a>
 * @version $Revision$
 */
public class DelegateToResolverClassMetadata<C, T> extends ClassMetadata<C,T>
{
   
   public DelegateToResolverClassMetadata(Class<C> clazz, Resolver<C, T> resolver, MethodResolver<C,MethodKey> methodResolver)
   {
      super(clazz, resolver, methodResolver);
   }
   
   /**
    * Delegating of field names to resolver, which can obtain them from given object.
    */
   public Map<T, Class<?>> getFields(C o)
   {
      return getResolver().getFields(null, o);
   }
   
}

